class player extends eui.Component implements eui.UIComponent {
	public constructor(father) {
		super();
		this.skinName = "playerSkin";
		this.father = father;
		//控制球无限循环动画
		var timer: egret.Timer = new egret.Timer(1000, 0);
		timer.addEventListener(egret.TimerEvent.TIMER, this.timerFunc, this);
		timer.start();
	}
	private index;
	private index1;
	private tixing;
	private isClick = true;
	private image0;
	private index2;
	public father;

	protected partAdded(partName: string, instance: any): void {
		super.partAdded(partName, instance);
	}


	protected childrenCreated(): void {
		super.childrenCreated();
		this.index2.play(1);


		this.tixing.addEventListener(egret.TouchEvent.TOUCH_BEGIN, function () {
			if (this.isClick) {
				this.index.play(0);
				this.isClick = !this.isClick;
			} else {
				this.index1.play(0);
				this.isClick = !this.isClick;
			}

		}, this);

		this.image0.addEventListener(egret.TouchEvent.TOUCH_BEGIN, function () {

			sceneManager.fun().loading(this.father, serve, "serve");
		}, this);
	}
	//控制球无限循环动画
	timerFunc() {
		this.index2.play(1);
	}

}